import { gql } from "@apollo/client";

export const getTimetablesByCourse_service = gql`
  query getTimetablesByCourse($courseId: String!) {
    getTimetablesByCourse(courseId: $courseId) {
      message
      data {
        id
        classDay
        startTime
        endTime
        limitNumber
        orgId
        courseId
      }
      code
      page {
        total
      }
    }
  }
`;

export const reserveCourse_service = gql`
  mutation reserveCourse(
    $courseId: String!
    $cardRecordId: String!
    $timetableId: String!
    $orgId: String!
  ) {
    reserveCourse(
      courseId: $courseId
      cardRecordId: $cardRecordId
      timetableId: $timetableId
      orgId: $orgId
    ) {
      code
      message
    }
  }
`;

export const getTimetableInfo_simple_service = gql`
  query getTimetableInfo($id: String!) {
    getTimetableInfo(id: $id) {
      code
      data {
        id
        startTime
        endTime
        classDay
      }
    }
  }
`;
